PlaywrightのSnapshot Testing
code:ts
import { test, expect } from '@playwright/test';
test('example test', async ({ page }) => {
await expect(page).toHaveScreenshot();
});
code:ts
import { test, expect } from '@playwright/test';
test('example test', async ({ page }) => {
expect(await page.textContent('.hero__title')).toMatchSnapshot('hero.txt');
});